package showtime.framework.engine
{
	import flash.display.Bitmap;
	import flash.display.BitmapData;
	import flash.geom.Point;

	public class Entity2D extends Bitmap implements IEntity
	{
		public var active:Boolean = false;
		
		public var solid:Boolean = false;
		
		public var velocity:Point = null;
		
		public var acceleration:Point = null;		
		/**
		 * The angle of game bitmap. 
		 */		
		public var angle:Number = 0;
		
		public function Entity2D(x:Number, y:Number)
		{
			this.x = x;
			this.y = y;
			
			visible = true;
			active = true;
			velocity = new Point();
			acceleration = new Point();
		}
		
		public function update():void
		{
			if (velocity.x == 0 && velocity.y == 0)
			{
				return;
			}
			
			x += velocity.x;
			y += velocity.y;
		}
		
		public function render():void
		{
			
		}
		
		public function destroy():void
		{
			active = false;
			velocity = null;
			acceleration = null;
		}
	}
}